#include <stdio.h>
#include <vector>

using namespace std;

int main()
{
    vector<int> vec;
    int i;

    printf("vector size: %d\n", vec.size());

    for(int i = 0; i < 5; i++) {
        vec.push_back(i);
    }

    printf("vector size: %d\n", vec.size());

    for(int i = 0; i < 5; i++) {
        printf("vec[%d] = %d\n", vec[i]);
    }

    vector<int>::iterator v = vec.begin();
    while(v != vec.end()) {
        printf("vec[%d]=%d\n", *v);
        v++;
    }

    return 0;
}